<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:83:"/www/wwwroot/jiedai.bianshenn.top/public/../application/index/view/login/login.html";i:1554084258;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>登录</title>
    <link rel="stylesheet" href="/static/index/css/weui.css"/>
    <link rel="stylesheet" href="/static/index/css/example.css"/>
    <script src="/static/index/js/jquery-1.11.3.js"></script>
    <script src="/static/index/js/jquery.js"></script>
    <script src="/static/index/layer/layer.js"></script>
    <style>
        .bg{background: url('/static/index/img/loginbg.png')no-repeat;
        width: 100%;
        height: 40%;
            background-size: 100% 100%;
        }
        .weui-cells{
            margin-top:1.17647059em;
          
            line-height:1.47058824;
            font-size:17px;
            overflow:hidden;
            position:relative;
        }
        .register{
            font-size: 1rem;
        }
              .backg{
            background-image: url('/static/index/images/backg.png');
            background-size: 100% 200%;
        }
    </style>
</head>
<body ontouchstart class="backg">
<div class="bg">
</div>
<div style="width:90%;position:absolute;top: 50%;left: 50%;transform: translateX(-50%);" >
    <div class="weui-cells" style="background-color: transparent;">
        <div class="weui-cell" style="background-color: transparent;">
            <div class="weui-cell__bd">
                <input  class="weui-input" style="width: 90%" type="text" name="phone" id="phone" placeholder="请输入手机号" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');">
            </div>
        </div>
    </div>
    <div class="weui-cells" style="background-color: transparent;">
        <div class="weui-cell" style="background-color: transparent;">
            <div class="weui-cell__bd">
                <input class="weui-input" type="password" style="width: 90%" name="password" id="password" placeholder="请输入密码">
            </div>
        </div>
    </div>



<br/>
    <br/>
    <a class="weui-btn weui-btn_primary" style="background: #265EC4;" id="showTooltips" onclick="login()" >确定</a>
    <br/>
    <center><a href="<?php echo url('login/register'); ?>" ><h3 class="register">注册</h3></a></center>
</div>
</body>
<script>
    function login() {
        //alert(123);
        var phone = $(" input[ name='phone' ] ").val();
        var password = $(" input[ name='password' ] ").val();
        if(phone == ''){layer.msg('用户名不能为空');return false;}
        if(password == ''){layer.msg('密码不能为空');return false;}
        $.ajax({
            url: "loginfind",
            type: "POST",
            data: {"phone":phone,"password":password},
            dataType: "json",
            //success 会在成功接收到返回数据后触发
            success:function (re) {
                if(re.code == 1){
                    layer.msg('登陆成功',location.href="<?php echo url('index/index'); ?>");
                }
                if(re.code == 2){
                    layer.msg('登陆失败，请检查账号密码');
                }
                if(re.code == 0){
                    layer.msg('提交为空');
                }
            }
        });
    }
</script>
<script src="/static/index/js/mui.min.js"></script>
<script>
    function plusReady(){
        var old_back = mui.back;
        mui.back = function() {
            //alert('不关闭')
        }
    }
    if(window.plus){
        plusReady();
    }else{
        document.addEventListener("plusready",plusReady,false);
    }
    // var cmr = plus.camera.getCamera();
    // cmr.captureImage(function (p){
    //     plus.io.resolveLocalFileSystemURL(p, function(entry){
    //         setImg(entry.toLocalURL());
    //     }, function(e){});
    // }, function(e){},{index:1,filename:"_doc/camera/"});
</script>
</html>